package edu.ar.bases.dvdstore.domainmodel.repositories;

import java.util.Collection;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import edu.ar.bases.dvdstore.domainmodel.entities.Alquiler;
import edu.ar.bases.dvdstore.domainmodel.repositories.interfaces.IAlquilerRepository;

public class AlquilerRepository extends HibernateDaoSupport implements IAlquilerRepository {
	
	public AlquilerRepository() {
		super();
	}

	public Collection<Alquiler> findAll()
	{
		return this.getHibernateTemplate().loadAll(Alquiler.class);
	}

	
	public void save(Alquiler entity)
	{
		this.getHibernateTemplate().save(entity);
	}
	
	
	public Alquiler findById(Integer eventoID)
	{
		return (Alquiler)this.getHibernateTemplate().get(Alquiler.class, eventoID);
	}
}
